<?php
$obj = $self->getFormObject();
?>
<div class="content-header row-fluid">
	<h3 class="pull-left"><?php echo $self->getFormTitle() ?></h3>
	<div class="actions pull-right">
		<a class="btn" href="<?php echo $self->getBackUrl() ?>">Back</a>
		
		<?php if($obj->getId()): ?>
		<a id="btnDelete" class="btn btn-danger" href="<?php echo $self->getRemoveUrl() ?>">Delete</a>
		<?php endif ?>
		
		<button id="btnSave" class="btn btn-primary">Save</button>
		<button id="btnSaveAndEdit" class="btn btn-primary">Save &amp; Edit</button>
	</div>
</div>
<form name="editForm" method="post" action="<?php echo $self->getFormAction() ?>" id="editForm" class="form-horizontal">
	<?php if ($obj->getId()): ?>
	<input type="hidden" name="id" value="<?php echo $obj->getId() ?>" />
	<?php endif ?>
	
	<?php $self->renderChild() ?>
</form>
<script type="text/javascript">
//<![CDATA[
initEditForm();
//]]>
</script>